<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>美兰数据文化馆与图书馆</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/huazhi/lib/layui-v2.5.5/css/layui.css" media="all">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/huazhi/css/public.css" media="all">
    <link rel="shortcut icon" href="<%=request.getContextPath()%>/huazhi/images/favicon.ico"/>
    <style>
        a, img {
            border: 0;
        }

        .main-flow li, .main-flow li.first, .main-flow li a, .main-flow li.last a, .main-flow .current, .main-flow .first-current, .main-flow .last-current, .main-flow .first-current, .main-flow .current a, .main-flow .first-current a, .main-flow .last-current a, .main-flow .last-current a {
            background: url(<%=request.getContextPath()%>/huazhi/lib/process/stepflow.png) no-repeat
        }

        .main-flow {
            overflow: hidden;
            zoom: 1;
            height: 28px;
            box-sizing: content-box;
        }

        .main-flow a {
            font-size: 12px;
            font-weight: 600;
            text-decoration: none;
            color: #fff;
            box-sizing: content-box;
        }

        .main-flow li {
            float: left;
            position: relative;
            z-index: 9;
            background-position: left -164px;
            line-height: 1.0;
            box-sizing: content-box;

        }

        .main-flow li.first {
            background-position: left -4px;
            box-sizing: content-box;
        }

        .main-flow li a {
            display: block;
            float: left;
            position: relative;
            z-index: 10;
            height: 21px;
            margin: 0 -15px 0 0;
            padding: 9px 25px 0;
            line-height: 12px;
            background-position: right -204px;
            box-sizing: content-box;
            cursor: default;
        }

        .main-flow li.first a {
            padding: 9px 25px 0 15px;
            cursor: default;
        }

        .main-flow li.last a {
            background-position: right -84px;
            cursor: default;
        }

        .main-flow .current, .main-flow .first-current, .main-flow .last-current {
            position: relative;
            z-index: 11;
            background-position: left -244px;
        }

        .main-flow .first-current {
            background-position: left -44px;
        }

        .main-flow .current a, .main-flow .first-current a, .main-flow .last-current a {
            color: #427c9b;
            position: relative;
            z-index: 12;
            background-position: right -284px;
            cursor: default;
        }

        .main-flow .first-current a {
            padding: 9px 25px 0 15px;
            cursor: default;
        }

        .main-flow .last-current a {
            background-position: right -124px;
            cursor: default;
        }
    </style>
</head>
<body>
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body">
            <div class="layui-tab-content">
                <table class="layui-hide" id="processTable" lay-filter="processTables"
                       style="box-sizing: border-box"></table>
                <div id="laypage"></div>
            </div>
        </div>
    </div>
</div>
<input type="hidden" id="curnum" value="1">
<script type="text/html" id="processOperation">
    <div class="layui-inline" lay-event="add" title="添加" style="box-sizing: border-box"><i
            class="layui-icon layui-icon-add-1"></i></div>
</script>
<script type="text/html" id="table-process">
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="info">详情</a>
    <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="update"></i>修改</a>
</script>
<script src="<%=request.getContextPath()%>/huazhi/lib/layui-v2.5.5/layui.all.js"></script>
<script src="<%=request.getContextPath()%>/huazhi/js/lay-config.js?v=1.0.4" charset="utf-8"></script>
<script>
    layui.use(['table', 'form', 'process'], function () {
        var $ = layui.$
            , table = layui.table
            , layer = layui.layer,
            form = layui.form;

        table.on('toolbar(processTables)', function (obj) {
            var checkStatus = table.checkStatus(obj.config.id)
                , data = checkStatus.data, //获取选中的数据
                newsId = [];
            switch (obj.event) {
                case 'add':
                    var clocess = "1";
                    var index = layer.open({
                        title: "添加",
                        type: 2,
                        content: '<%=request.getContextPath()%>/rest/getRoute?type=system&url=process_add',
                        maxmin: true,
                        area: ['90%', '91%'],
                        //是否显示右上角关闭图标，默认为1，显示
                        anim: 4,
                        shade: 0.6,
                        skin: 'layui-layer-molv',
                        resize: true,
                        cancel: function (index, layero) {
                            layer.close(index)
                            clocess = "2"
                            return false;
                        },
                        success: function (layero, index) {  //当你需要在层创建完毕时即执行一些语句，可以通过该回调 想相当于吧值转到子界面
                            var body = layer.getChildFrame('body', index);//建立父子联系  //当你试图在当前页获取iframe页的DOM元素时，你可以用此方法。
                        },
                        end: function () {
                            if (clocess == "2") {

                            } else {
                                table.reload('processTable')
                            }
                            return false;
                        }
                    });
                    break;
            }
        });
    });
</script>
</body>
</html>
